3.179 \(\int (a+a \tan ^2(c+d x))^4 \, dx\)

Optimal. Leaf size=65 \[ \frac {a^4 \tan ^7(c+d x)}{7 d}+\frac {3 a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^3(c+d x)}{d}+\frac {a^4 \tan (c+d x)}{d} \]

[Out]

a^4*tan(d*x+c)/d+a^4*tan(d*x+c)^3/d+3/5*a^4*tan(d*x+c)^5/d+1/7*a^4*tan(d*x+c)^7/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3657, 12, 3767} \[ \frac {a^4 \tan ^7(c+d x)}{7 d}+\frac {3 a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^3(c+d x)}{d}+\frac {a^4 \tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Tan[c + d*x]^2)^4,x]

[Out]

(a^4*Tan[c + d*x])/d + (a^4*Tan[c + d*x]^3)/d + (3*a^4*Tan[c + d*x]^5)/(5*d) + (a^4*Tan[c + d*x]^7)/(7*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \left (a+a \tan ^2(c+d x)\right )^4 \, dx &=\int a^4 \sec ^8(c+d x) \, dx\\ &=a^4 \int \sec ^8(c+d x) \, dx\\ &=-\frac {a^4 \operatorname {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac {a^4 \tan (c+d x)}{d}+\frac {a^4 \tan ^3(c+d x)}{d}+\frac {3 a^4 \tan ^5(c+d x)}{5 d}+\frac {a^4 \tan ^7(c+d x)}{7 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 46, normalized size = 0.71 \[ \frac {a^4 \left (\frac {1}{7} \tan ^7(c+d x)+\frac {3}{5} \tan ^5(c+d x)+\tan ^3(c+d x)+\tan (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Tan[c + d*x]^2)^4,x]

[Out]

(a^4*(Tan[c + d*x] + Tan[c + d*x]^3 + (3*Tan[c + d*x]^5)/5 + Tan[c + d*x]^7/7))/d

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 56, normalized size = 0.86 \[ \frac {5 \, a^{4} \tan \left (d x + c\right )^{7} + 21 \, a^{4} \tan \left (d x + c\right )^{5} + 35 \, a^{4} \tan \left (d x + c\right )^{3} + 35 \, a^{4} \tan \left (d x + c\right )}{35 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="fricas")

[Out]

1/35*(5*a^4*tan(d*x + c)^7 + 21*a^4*tan(d*x + c)^5 + 35*a^4*tan(d*x + c)^3 + 35*a^4*tan(d*x + c))/d

________________________________________________________________________________________

giac [B]  time = 20.74, size = 519, normalized size = 7.98 \[ -\frac {35 \, a^{4} \tan \left (d x\right )^{7} \tan \relax (c)^{6} + 35 \, a^{4} \tan \left (d x\right )^{6} \tan \relax (c)^{7} + 35 \, a^{4} \tan \left (d x\right )^{7} \tan \relax (c)^{4} - 105 \, a^{4} \tan \left (d x\right )^{6} \tan \relax (c)^{5} - 105 \, a^{4} \tan \left (d x\right )^{5} \tan \relax (c)^{6} + 35 \, a^{4} \tan \left (d x\right )^{4} \tan \relax (c)^{7} + 21 \, a^{4} \tan \left (d x\right )^{7} \tan \relax (c)^{2} - 35 \, a^{4} \tan \left (d x\right )^{6} \tan \relax (c)^{3} + 315 \, a^{4} \tan \left (d x\right )^{5} \tan \relax (c)^{4} + 315 \, a^{4} \tan \left (d x\right )^{4} \tan \relax (c)^{5} - 35 \, a^{4} \tan \left (d x\right )^{3} \tan \relax (c)^{6} + 21 \, a^{4} \tan \left (d x\right )^{2} \tan \relax (c)^{7} + 5 \, a^{4} \tan \left (d x\right )^{7} - 7 \, a^{4} \tan \left (d x\right )^{6} \tan \relax (c) + 105 \, a^{4} \tan \left (d x\right )^{5} \tan \relax (c)^{2} - 315 \, a^{4} \tan \left (d x\right )^{4} \tan \relax (c)^{3} - 315 \, a^{4} \tan \left (d x\right )^{3} \tan \relax (c)^{4} + 105 \, a^{4} \tan \left (d x\right )^{2} \tan \relax (c)^{5} - 7 \, a^{4} \tan \left (d x\right ) \tan \relax (c)^{6} + 5 \, a^{4} \tan \relax (c)^{7} + 21 \, a^{4} \tan \left (d x\right )^{5} - 35 \, a^{4} \tan \left (d x\right )^{4} \tan \relax (c) + 315 \, a^{4} \tan \left (d x\right )^{3} \tan \relax (c)^{2} + 315 \, a^{4} \tan \left (d x\right )^{2} \tan \relax (c)^{3} - 35 \, a^{4} \tan \left (d x\right ) \tan \relax (c)^{4} + 21 \, a^{4} \tan \relax (c)^{5} + 35 \, a^{4} \tan \left (d x\right )^{3} - 105 \, a^{4} \tan \left (d x\right )^{2} \tan \relax (c) - 105 \, a^{4} \tan \left (d x\right ) \tan \relax (c)^{2} + 35 \, a^{4} \tan \relax (c)^{3} + 35 \, a^{4} \tan \left (d x\right ) + 35 \, a^{4} \tan \relax (c)}{35 \, {\left (d \tan \left (d x\right )^{7} \tan \relax (c)^{7} - 7 \, d \tan \left (d x\right )^{6} \tan \relax (c)^{6} + 21 \, d \tan \left (d x\right )^{5} \tan \relax (c)^{5} - 35 \, d \tan \left (d x\right )^{4} \tan \relax (c)^{4} + 35 \, d \tan \left (d x\right )^{3} \tan \relax (c)^{3} - 21 \, d \tan \left (d x\right )^{2} \tan \relax (c)^{2} + 7 \, d \tan \left (d x\right ) \tan \relax (c) - d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="giac")

[Out]

-1/35*(35*a^4*tan(d*x)^7*tan(c)^6 + 35*a^4*tan(d*x)^6*tan(c)^7 + 35*a^4*tan(d*x)^7*tan(c)^4 - 105*a^4*tan(d*x)
^6*tan(c)^5 - 105*a^4*tan(d*x)^5*tan(c)^6 + 35*a^4*tan(d*x)^4*tan(c)^7 + 21*a^4*tan(d*x)^7*tan(c)^2 - 35*a^4*t
an(d*x)^6*tan(c)^3 + 315*a^4*tan(d*x)^5*tan(c)^4 + 315*a^4*tan(d*x)^4*tan(c)^5 - 35*a^4*tan(d*x)^3*tan(c)^6 +
21*a^4*tan(d*x)^2*tan(c)^7 + 5*a^4*tan(d*x)^7 - 7*a^4*tan(d*x)^6*tan(c) + 105*a^4*tan(d*x)^5*tan(c)^2 - 315*a^
4*tan(d*x)^4*tan(c)^3 - 315*a^4*tan(d*x)^3*tan(c)^4 + 105*a^4*tan(d*x)^2*tan(c)^5 - 7*a^4*tan(d*x)*tan(c)^6 +
5*a^4*tan(c)^7 + 21*a^4*tan(d*x)^5 - 35*a^4*tan(d*x)^4*tan(c) + 315*a^4*tan(d*x)^3*tan(c)^2 + 315*a^4*tan(d*x)
^2*tan(c)^3 - 35*a^4*tan(d*x)*tan(c)^4 + 21*a^4*tan(c)^5 + 35*a^4*tan(d*x)^3 - 105*a^4*tan(d*x)^2*tan(c) - 105
*a^4*tan(d*x)*tan(c)^2 + 35*a^4*tan(c)^3 + 35*a^4*tan(d*x) + 35*a^4*tan(c))/(d*tan(d*x)^7*tan(c)^7 - 7*d*tan(d
*x)^6*tan(c)^6 + 21*d*tan(d*x)^5*tan(c)^5 - 35*d*tan(d*x)^4*tan(c)^4 + 35*d*tan(d*x)^3*tan(c)^3 - 21*d*tan(d*x
)^2*tan(c)^2 + 7*d*tan(d*x)*tan(c) - d)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 43, normalized size = 0.66 \[ \frac {a^{4} \left (\frac {\left (\tan ^{7}\left (d x +c \right )\right )}{7}+\frac {3 \left (\tan ^{5}\left (d x +c \right )\right )}{5}+\tan ^{3}\left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(d*x+c)^2)^4,x)

[Out]

1/d*a^4*(1/7*tan(d*x+c)^7+3/5*tan(d*x+c)^5+tan(d*x+c)^3+tan(d*x+c))

________________________________________________________________________________________

maxima [B]  time = 0.47, size = 157, normalized size = 2.42 \[ a^{4} x + \frac {{\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} a^{4}}{105 \, d} + \frac {4 \, {\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{4}}{15 \, d} + \frac {2 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{4}}{d} - \frac {4 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{4}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)^2)^4,x, algorithm="maxima")

[Out]

a^4*x + 1/105*(15*tan(d*x + c)^7 - 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 105*d*x + 105*c - 105*tan(d*x + c))
*a^4/d + 4/15*(3*tan(d*x + c)^5 - 5*tan(d*x + c)^3 - 15*d*x - 15*c + 15*tan(d*x + c))*a^4/d + 2*(tan(d*x + c)^
3 + 3*d*x + 3*c - 3*tan(d*x + c))*a^4/d - 4*(d*x + c - tan(d*x + c))*a^4/d

________________________________________________________________________________________

mupad [B]  time = 11.52, size = 53, normalized size = 0.82 \[ \frac {\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7}+\frac {3\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5}+a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3+a^4\,\mathrm {tan}\left (c+d\,x\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)^2)^4,x)

[Out]

(a^4*tan(c + d*x) + a^4*tan(c + d*x)^3 + (3*a^4*tan(c + d*x)^5)/5 + (a^4*tan(c + d*x)^7)/7)/d

________________________________________________________________________________________

sympy [A]  time = 1.06, size = 68, normalized size = 1.05 \[ \begin {cases} \frac {a^{4} \tan ^{7}{\left (c + d x \right )}}{7 d} + \frac {3 a^{4} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {a^{4} \tan ^{3}{\left (c + d x \right )}}{d} + \frac {a^{4} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \tan ^{2}{\relax (c )} + a\right )^{4} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(d*x+c)**2)**4,x)

[Out]

Piecewise((a**4*tan(c + d*x)**7/(7*d) + 3*a**4*tan(c + d*x)**5/(5*d) + a**4*tan(c + d*x)**3/d + a**4*tan(c + d
*x)/d, Ne(d, 0)), (x*(a*tan(c)**2 + a)**4, True))

________________________________________________________________________________________